package com.fxp.landing;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;


public class Interfsce extends JFrame {
	private JPanel p;
	private JButton btn1, btn2;

	public Interfsce() {
		p = new JPanel();
		p.setLayout(null);
		setTitle("欢迎来到图书管理系统");
		btn1 = new JButton("学生登录");
		btn2 = new JButton("管理员登录");
		btn1.setBounds(190, 50, 200, 50);
		btn2.setBounds(190, 150, 200, 50);
		btn1.setFont(new Font("宋体", 00, 30));
		btn2.setFont(new Font("宋体", 00, 30));
		p.setBackground(Color.GRAY);
		add(btn1);
		add(btn2);
		add(p);
		setSize(600, 300);

		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setVisible(true);

		btn1.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				setVisible(false);
				XS xs = new XS();

			}
		});
		btn2.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
				LS ls = new LS();
				;
			}
		});
		setLocation(400, 500);
	}

	public static void main(String args[]) {
		new Interfsce();
	}
}
